#include "bytearraylist.h"

ByteArrayList::ByteArrayList()
{
    this->listLen = 0;
    this->maxSizeEachArray = MIN_SIZE_EACH_ARRAY;  //默认每个数组长度最大1024字节
}


//int ByteArrayList::getListSize(){
//    return this->listSize;
//}
int ByteArrayList::getListLen(){
    return this->listLen;
}
void ByteArrayList::appendArray(QByteArray q){
    if(this->maxSizeEachArray < q.size()){
        this->maxSizeEachArray = q.size();
    }
    this->append(q);
    listLen++;
}
//void ByteArrayList::setMaxSizeEachArray(int max){
//    if(max < 1024){
//        this->maxSizeEachArray = MIN_SIZE_EACH_ARRAY;
//        return;
//    }
//    this->maxSizeEachArray = max;
//}
int ByteArrayList::getMaxSizeEachArray(){
    return this->maxSizeEachArray;
}
